package com.gy.entity.research;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.sql.Timestamp;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("result_longitudinal_projects")
@ApiModel("纵向课题")
public class Longitudinal {
    @ApiModelProperty("唯一标识符")
    @TableId(type = IdType.AUTO)
    @TableField("id")
    private Long id;

    @ApiModelProperty("课题名称")
    @TableField("project_name")
    private String projectName;

    @ApiModelProperty("基金名称")
    @TableField("fund_name")
    private String fundName;

    @ApiModelProperty("课题类型")
    @TableField("project_type")
    private String projectType;

    @ApiModelProperty("授予单位")
    @TableField("granting_unit")
    private String grantingUnit;

    @ApiModelProperty("课题级别")
    @TableField("project_level")
    private String projectLevel;

    @ApiModelProperty("课题编号")
    @TableField("project_number")
    private String projectNumber;

    @ApiModelProperty("到账经费(万)")
    @TableField("funding_amount")
    private BigDecimal fundingAmount;

    @ApiModelProperty("本人排名")
    @TableField("`rank`")
    private Integer rank;

    @ApiModelProperty("开始时间")
    @TableField("start_time")
    private Timestamp startTime;

    @ApiModelProperty("截止时间")
    @TableField("end_time")
    private Timestamp endTime;

    @ApiModelProperty("作者信息")
    @TableField("author_info")
    private String authorInfo;

    @ApiModelProperty("课题状态")
    @TableField("project_status")
    private String projectStatus;

    @ApiModelProperty("备注信息")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty("PDF URL")
    @TableField("pdf_url")
    private String pdfPath;

    @ApiModelProperty("成功同步")
    @TableField("sync_status")
    private String syncStatus;

    @ApiModelProperty("创建时间")
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private Timestamp createdAt;

    @ApiModelProperty("更新时间")
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private Timestamp updatedAt;

    @ApiModelProperty("关联用户ID")
    @TableField("user_id")
    private Long userId;
}
